package com.risenb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.risenb.bean.Group;
import com.risenb.dao.GroupMapper;
import com.risenb.service.GroupService;

@Service
public class GroupServiceImpl implements GroupService {
	
	@Autowired
	GroupMapper groupMapper;
	
	@Override
	public int removeGroupById(Integer id) {
		return groupMapper.removeGroupById(id);
	}

	@Override
	public int createGroup(Group record) {
		return groupMapper.createGroup(record);
	}

	@Override
	@Cacheable(cacheNames="baseCache")
	public Group queryGroupById(Integer id) {
		return groupMapper.queryGroupById(id);
	}

	@Override
	public int modifyGroupById(Group record) {
		return groupMapper.modifyGroupById(record);
	}

	@Override
	public List<Group> queryAll(Group record) {
		return groupMapper.queryAll(record);
	}

}

